from microbit import *

while True:
    v = pin0.read_analog()
    BAT = v * 3.3 / 1024
    display.scroll('{:.1f}v'.format(BAT))
    sleep(1000)